-
Notifications
You must be signed in to change notification settings - Fork 702
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support unsigned numeric config #1546
base: unstable
Are you sure you want to change the base?
Conversation
Signed-off-by: artikell <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## unstable #1546 +/- ##
============================================
+ Coverage 70.77% 70.90% +0.13%
============================================
Files 120 120
Lines 65005 65108 +103
============================================
+ Hits 46005 46165 +160
+ Misses 19000 18943 -57
|
Signed-off-by: artikell <[email protected]>
9787901
to
6156c1c
Compare
Signed-off-by: skyfirelee <[email protected]>
Is there a concrete need for this, or are you just looking to make the API more usable by extending the use cases? We had discussed previously in Redis, and had decided to avoid having a large number of APIs, we would only support signed until someone indicated they clearly needed a 64 bit unsigned value. You can always restrict the value to be positive and cast it to unsigned (but just miss some of the high values). |
Yes, we encountered some scenarios. In some designs, uint64 is used as the ID, and the higher bits are used to store some information. However, for the |
VALKEYMODULE_CONFIG_UNSIGNED
andUNSIGNED_CONFIG
for a wider range of configurations.ValkeyModule_RegisterUnsignedNumericConfig
string2ull
method supports the length parameter, making it more secure